package com.aisile.admin.controller.v1;

import com.aisile.admin.service.WemediaNewsAutoScanService;
import com.aisile.admin.service.impl.WemediaNewsAutoScanServiceImpl;
import com.aisile.apis.admin.NewsAuthControllerApi;
import com.aisile.model.admin.dtos.NewsAuthDto;
import com.aisile.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.POST;

/**
 * @Auther:yry
 * @Date:2024/1/11 0011
 * @VERSON:1.0
 */
@RestController
@RequestMapping("/api/v1/news_auth")
public class NewsAuthController implements NewsAuthControllerApi {

    @Autowired
    private WemediaNewsAutoScanService wemediaNewsAutoScanService;

    @PostMapping("/auth_pass")
    @Override
    public ResponseResult authPass(@RequestBody NewsAuthDto dto) {
        return wemediaNewsAutoScanService.updateStatus(0,dto);
    }

    @PostMapping("/auth_fail")
    @Override
    public ResponseResult authFail(@RequestBody NewsAuthDto dto) {
        return wemediaNewsAutoScanService.updateStatus(0,dto);
    }
}
